package com.splic.product.dto;

import lombok.Data;

import java.time.OffsetDateTime;

@Data
public class WeatherInfoDTO {
    public OffsetDateTime LocalObservationDateTime;
    public long EpochTime;
    public String WeatherText;
    public int WeatherIcon;
    public boolean IsDayTime;

    public TemperatureDTO Temperature;
    public WindDTO Wind;
    public TemperatureSummaryDTO TemperatureSummary;

    // Nested DTO classes

    @Data
    public static class TemperatureDTO {
        public MetricDTO Metric;
    }

    @Data
    public static class MetricDTO {
        public double Value;
    }

    @Data
    public static class WindDTO {
        public DirectionDTO Direction;
        public SpeedDTO Speed;
    }

    @Data
    public static class DirectionDTO {
        public int Degrees;
        public String Localized;
        public String English;
    }

    @Data
    public static class SpeedDTO {
        public MetricSpeedDTO Metric;
    }

    @Data
    public static class MetricSpeedDTO {
        public double Value;
        public String Unit;
        public int UnitType;
    }

    @Data
    public static class TemperatureSummaryDTO {
        public Past6HourRangeDTO Past6HourRange;
        public Past12HourRangeDTO Past12HourRange;
        public Past24HourRangeDTO Past24HourRange;
    }

    @Data
    public static class Past6HourRangeDTO {
        public MinimumDTO Minimum;
        public MaximumDTO Maximum;
    }

    @Data
    public static class Past12HourRangeDTO {
        public MinimumDTO Minimum;
        public MaximumDTO Maximum;
    }

    @Data
    public static class Past24HourRangeDTO {
        public MinimumDTO Minimum;
        public MaximumDTO Maximum;
    }

    @Data
    public static class MinimumDTO {
        public MetricDTO Metric;
    }

    @Data
    public static class MaximumDTO {
        public MetricDTO Metric;
    }
}
